

<div style="" id="SearchResultsContainer"><script>
    PeopleMedia.Search.SetCurrentPage(1);
    PeopleMedia.Search.SetViewGallery(false);
    </script>
    <div class="searchresults">
        <div class="yescontenttoprow">
            <p class="results"><?php echo $count; ?> 
                results</p>

            <!--<div class="color-main" id="paginationalone">
                <a href="javascript:;"><img border="0" class="arrowunavailable" alt="" src="<?php echo FRONT_SITE_URL ?>www/images/images1/leftarrow.png"></a>

                <span class="paginationon">1</span>
                <a page-index="2" href="javascript:;">2</a>
                <a page-index="3" href="javascript:;">3</a>
                <a page-index="4" href="javascript:;">4</a>

                <a page-index="2" href="javascript:;"><img border="0" alt="" src="<?php echo FRONT_SITE_URL ?>www/images/images1/rightarrow.png"></a>
            </div>-->


            <div class="toprowfloatright">
                <div class="listpagelinksarea">
                    <p class="viewbylist lightgraytext">
                        View by:</p>
                    <div class="listpagelinksarea3 listpagelinksarea3off">
                        <p>
                            <a id="DisplayGalleryLink" href="javascript:;">Gallery</a></p>
                    </div>
                    <div class="listpagelinksarea1  listpagelinksarea1on">
                        <p>
                            <a id="DisplayListLink" href="javascript:;">List</a></p>
                    </div>
                </div>
            </div>
            <p class="clearfix">
                &nbsp;</p>
        </div>
        <div class="yescontentmiddlerow">
            <br>
            <div class="morecommunications bgcolor-main">
                <p class="color-alt">
                    We’ve extended your search to include other potential matches.
                </p>
            </div>

            <?php
            foreach ($models as $model):
                ?>

                <?php if ($model->is_online == 1) { ?>
                    <div class="profilerepeat ">
                        <div class="profilerepeatcol1large">
                            <div id="profileoverlayplace">
                                <div id="profileoverlaylarge">

                                    <p>
                                        <!--<a href="">27 more photos</a>--></p>
                                </div>
                            </div>
                            <a title="Mandalyn" href="<?php echo FRONT_SITE_URL;?>user/profile/viewprofile?profile=<?php echo $model->user_id; ?>">
                                 <?php if ($model->userPhoto->link_img != null) { ?>
                                <img border="0" class="userpiclarge" src="<?php echo FRONT_SITE_URL ?>www/uploads/photos/thumbs/<?php echo 'thumb_' . $model->userPhoto->link_img; ?>">
                            <?php } ?>
                            <?php if ($model->userPhoto->link_img == null) { ?>
                                <img border="0" class="userpiclarge" src="<?php echo FRONT_SITE_URL ?>www/images/images1/noPhoto-1t.gif">
                            <?php } ?>
                            </a>
                        </div>
                        <div class="profilerepeatcol2large">
                            <div class="profilerepeatcol2row1">
                                <p>
                                    <a href="<?php echo FRONT_SITE_URL;?>user/profile/viewprofile?profile=<?php echo $model->user_id; ?>"><?php echo $model->username; ?></a></p>
                                <a style="" fav-member-id="E72D2CDCB1009D48" href="javascript:;">
                                    <img border="0" title="Save as Favorite" alt="" src="<?php echo FRONT_SITE_URL ?>www/images/images1/favoriteicon.png">
                                    <!--TODO: If in test and not favorite, show add to favoritest text-->
                                    Save to Favorites
                                </a><a style="display:none;" unfav-member-id="E72D2CDCB1009D48" href="javascript:;">
                                    <img border="0" title="Saved as Favorite" alt="" src="<?php echo FRONT_SITE_URL ?>www/images/images1/favoritedicon.png">
                                </a>
                            </div>
                            <div class="profilerepeatcol2row2">
                                <p>
                                    <?php
                                    $birthDate = $model->profile->birthdate;
                                    $dob = date("Y-m-d", strtotime($birthDate));

                                    $dobObject = new DateTime($dob);
                                    $nowObject = new DateTime();

                                    $diff = $dobObject->diff($nowObject);

                                    echo $diff->y;
                                    ?>

                                    | <?php echo $model->profile->state; ?>, <?php echo $model->profile->country; ?> </p>
                                <p>
                                    &nbsp;|</p>
                                <p><a style="cursor:pointer;" title="Online Now Chat" >  
                                        <img border="0" src="<?php echo FRONT_SITE_URL ?>www/images/images1/onlinechatbutton.png">
                                    </a></p>
                            </div>
                            <div class="profilerepeatcol2row3">
                                <p>
                                    <span class="lightgraytext">A little about me:</span>&nbsp;
                                    <?php echo $model->profile->greeting1; ?> ...
                                    &nbsp;<a href="<?php echo FRONT_SITE_URL;?>user/profile/viewprofile?profile=<?php echo $model->user_id; ?>">View Full Profile</a></p>
                            </div>
                        </div>
                        <p class="clearfix">
                            &nbsp;</p>
                    </div>
                <?php } ?>
            <?php endforeach; ?>
        </div>
        <div class="bottomrow">
           <!-- <div class="color-main" id="paginationsearch">
                <div id="paginationsearchleft">
                    <a title="Previous" class="button_style buttonunavailable" href="javascript:;">Previous</a>
                </div>--->
                <!--<div id="paginationsearchcenter">
                    <a href="javascript:;">
                        <img border="0" class="arrowunavailable" alt="" src="<?php echo FRONT_SITE_URL ?>www/images/images1/leftarrow.png"></a>
                    <span class="paginationon">1</span>
                    <a page-index="2" href="javascript:;">2</a>
                    <a page-index="3" href="javascript:;">3</a>
                    <a page-index="4" href="javascript:;">4</a>
                    <a page-index="2" href="javascript:;">
                        <img border="0" alt="" src="<?php echo FRONT_SITE_URL ?>www/images/images1/rightarrow.png"></a>
                </div>-->
               <!-- <div id="paginationsearchright">
                    <a title="Next" class="button_style" page-index="2" href="javascript:;">
                        Next</a>
                </div>
            </div>-->





        </div>
    </div>
</div>
